//package com.leejxx.health.config;
//
//import com.leejxx.health.jobs.ClearImageJob;
//import org.quartz.*;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.text.ParseException;
//
///**
// * @Author LeeJx
// * @ClassName QuartzConfig
// * @Description TODO
// * @date 2021/1/2 15:06
// * @Version 1.0
// */
//@Configuration
//public class QuartzConfig {
//    @Bean
//    public JobDetail clearImageJobDetail(){
//        return JobBuilder.newJob()//ClearImageJob我们的业务类
//                .withIdentity("clearImageJobDetail")//可以给该JobDetail起一个id
//                .storeDurably(true)
//                .build();
//    }
//    @Bean
//    public Trigger printTimeJobTrigger(@Qualifier("clearImageJobDetail") JobDetail jobDetail) throws ParseException {
//        return TriggerBuilder.newTrigger()
//                .forJob(jobDetail)//关联上述的JobDetail
//                .withIdentity("clearImageJobTrigger")//给Trigger起个名字
//                .withSchedule(CronScheduleBuilder.cronSchedule("0/5 * * * * ?"))// 设置定时执行的规律
//                .build();
//    }
//}
